// 认证码控制层
package controller

import (
	"admin-api/api/service"
	"admin-api/common/result"
	"github.com/gin-gonic/gin"
)

// swagger文档
// @Summary 获取验证码
// @Description 获取验证码
// @Tags 验证码
// @Accept  json
// @Produce  json
// @Success 200 {object} result.Result
// @Router /api/captcha [get]
func Captcha(c *gin.Context) {
	id, base64Image := service.CapMake()
	result.Success(c, map[string]interface{}{"idkey": id, "base64Image": base64Image})
}
